//
//  ViewController.m
//  JGMusicAnimation
//
//  Created by Mei Jigao on 16/3/7.
//  Copyright (c) 2016年 MEETStudio. All rights reserved.
//

#import "ViewController.h"
#import "JGMusicAnimationConfig.h"
#import "JGAudioFileViewController.h"
#import "JGMicroPhoneViewController.h"

@interface ViewController () {
    
}

@end

@implementation ViewController

#pragma mark - init & dealloc
- (instancetype)init {
    
    self = [super initWithNibName:NSStringFromClass([self class]) bundle:[NSBundle mainBundle]];
    if (self) {
        
    }
    return self;
}

- (void)dealloc {
    
    JGMALog();
}

#pragma mark - UIViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.view setBackgroundColor:[UIColor whiteColor]];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    [self.navigationController setNavigationBarHidden:YES];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    [self.navigationController setNavigationBarHidden:NO];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - IBAction
- (IBAction)musicAction:(id)sender {
    
    JGAudioFileViewController *viewCtr = [[JGAudioFileViewController alloc] init];
    [self.navigationController pushViewController:viewCtr animated:YES];
}

- (IBAction)microPhoneAction:(id)sender {
    
    JGMicroPhoneViewController *viewCtr = [[JGMicroPhoneViewController alloc] init];
    [self.navigationController pushViewController:viewCtr animated:YES];
}

#pragma mark - end

@end
